from datetime import datetime

from pydantic import BaseModel


class OrderBase(BaseModel):
    status: int
    pass


class OrderCreate(OrderBase):
    user_id: int
    pic: str
    type: int
    size: str = None
    pixel: str
    created_at: datetime = datetime.now()
    updated_at: datetime = datetime.now()
    pass


class OrderUpdate(OrderBase):
    out_pic: str
    updated_at: datetime = datetime.now()


class Order(OrderBase):
    id: int

    class Config:
        from_attributes = True
